package cn.net.lwj.moredb.service.impl;

import cn.net.lwj.common.model.JsonResult;
import cn.net.lwj.common.model.kingbase.TUser;
import cn.net.lwj.moredb.mapper.kingbase.TUserMapper;
import cn.net.lwj.moredb.mapper.mysql.TreeMapper;
import cn.net.lwj.moredb.service.TestService;
import java.util.List;
import java.util.Map;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Log
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TreeMapper treeMapper;

    @Autowired
    private TUserMapper userMapper;

    @Override
    public JsonResult test() {
        //List<TUser> tUsers = userMapper.selectAll();
        //System.out.println(tUsers);
        List<TUser> tUsers = userMapper.selectAll();

        List<Map<String, Object>> qgfyTree = treeMapper.getQgfyTree("114");
        qgfyTree.forEach(System.out::println);

        return JsonResult.responseSuccess("success", qgfyTree);
    }
}
